﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class CategoryProduct : System.Web.UI.Page
{

    DBConnection connect = new DBConnection();

    protected void Page_Load(object sender, EventArgs e)
    {
        String cateid = Request.QueryString["CateId"].ToString();
        int id = Convert.ToInt32(cateid);
        
        DataSet ds = connect.GetCategoryById(id);
        collect.PageSize = 6;
        collect.DataSource = ds.Tables[0].DefaultView;
        collect.BindToControl = itemRepeater;
        itemRepeater.DataSource = collect.DataSourcePaged;


        DataList1.DataSource = connect.GetCategoryName(id);
        DataList1.DataBind();
    }

   
}